#!/bin/bash
#

#字符串替换 txt——>php
for old_file in $(find /opt/test -name "*.php"); do
    new_file=${old_file/php/txt}
    mv ${old_file} ${new_file}
done
